package com.pro.common.api.user.task.intf;

import com.pro.common.api.CommonConst;
import com.pro.common.api.user.task.model.db.UserTask;
import com.pro.common.api.user.task.model.request.UserTaskCreatRequest;
import com.pro.common.api.user.task.model.request.UserTaskStepSubmitRequest;
import io.swagger.v3.oas.annotations.Hidden;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

//@Tag(name = "用户任务")
@FeignClient(name = CommonConst.Modules.user, contextId = "UserTaskFeignClient")
@Hidden
public interface UserTaskFeignClient {

    @PostMapping("/userTask/listByIds")
    List<UserTask> listByIds(@RequestBody List<Long> ids);

    /**
     * 某一步结果 批量提交到成功/失败. 如果成功就生成下一步
     */
    @PostMapping("/userTask/create")
    void create(@RequestBody List<UserTaskCreatRequest> tasks);
    /**
     * 某一步结果 批量提交到成功/失败. 如果成功就生成下一步
     */
    @PostMapping("/userTask/submitStepsNotify")
    void submitStepsNotify(@RequestBody List<UserTaskStepSubmitRequest> steps);
}
